package com.csu.letaobackend.serviceM;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.csu.letaobackend.bean.*;
import com.csu.letaobackend.commom.CommonResponse;
import com.csu.letaobackend.dto.ItemVO2;
import com.csu.letaobackend.vo.*;

import java.util.List;

public interface CatalogMService {


      CommonResponse<List<CategoryVO>> getCategories();

      CommonResponse<List<ProductVO>> getProductsByCategoryId(int categoryId);

      CommonResponse<List<ItemVO>> getItemsByProductId(int productId, String username);

      CommonResponse<List<ItemVO>> getItemsByProductId(int productId, int sortby, String username);

      CommonResponse<IPage<ItemVO>> getItemsPages(int productId, int sortby, int currentPage, int pageSize, String username);

      CommonResponse<IPage<ItemVO>> getAllItems(int sortby, int currentPage, int pageSize, String username);

      CommonResponse<List<ItemAttrVO>> getAttrByItemId(int itemId);

      CommonResponse<List<ItemVO>> getItemsByShopId(int shopId, int sortby, String username);

      CommonResponse<IPage<ItemVO>> getItemsPagesByShopId(int shopId, int sortby, int currentPage, int pageSize, String username);

      CommonResponse<IPage<ItemVO>> searchItemsPages(String keyword, int categoryId, int sortby, int currentPage, int pageSize, String username);

      CommonResponse<IPage<ItemVO>> searchItemsPagesByProduct(String keyword, int productId, int sortby, int currentPage, int pageSize, String username);

      CommonResponse additem(ItemVO2 itemVO2);

      CommonResponse updateitem(Item item);

      CommonResponse updatestatus(int itemid, int available, int isnew, int isrecommend);

      CommonResponse deleteitem(int itemid);

      CommonResponse addCategory(Category category);

      CommonResponse updateCategory(Category category);

      CommonResponse addProduct(Product product);

      CommonResponse updateProduct(Product product);

      CommonResponse<List<Attributes>> getAttributes();

      CommonResponse<List<Attrvalues>> getAttrvalues(int attrid);

}
